package com.itsense.stock.mapper;

import com.itsense.stock.pojo.entity.SysUserRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author sense
* @description 针对表【sys_user_role(用户角色表)】的数据库操作Mapper
* @createDate 2024-12-30 20:59:30
* @Entity com.itsense.stock.pojo.entity.SysUserRole
*/
public interface SysUserRoleMapper {

    int deleteByPrimaryKey(Long id);

    int insert(SysUserRole record);

    int insertSelective(SysUserRole record);

    SysUserRole selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysUserRole record);

    int updateByPrimaryKey(SysUserRole record);

    /**
     * 通过id查询用户的角色id
     * @param userId
     * @return
     */
    List<String> selectByUserId(@Param("userId") String userId);

    /**
     * 更新用户角色数据
     * @param entities
     * @return
     */
    int insertRoles(@Param("entities") List<SysUserRole> entities);

}
